import javax.swing.*;

public class MainFrame extends JFrame{
    private JPanel mainPanel;

    public MainFrame(String title) {

        this.setTitle(title);
        this.setContentPane(this.mainPanel);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        this.pack();
        this.setVisible(true);
    }
}
